package com.iplant.basic.service.po.fmc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.join.multi.DBJoinMulti;
import com.iplant.base.utils.annotation.po.DBBasePO;

import java.util.ArrayList;
import java.util.List;

/**
 * 工位 IP配置
 *
 * @author YouWang·Peng
 * 2023-10-13 14:25:00
 */
@DBBasePO(TableName = "FMC_IP_Config", Name = false, CheckName = {"Code", "TerminalNumber", "IPAddress"}, CodeAuto = true,
        CodePrefix = "FIC-", CodeNum = 4)
public class FMCIPConfig extends BasePO {
    /**
     * 终端编号
     */
    @DBCondition
    @DBField
    public String TerminalNumber = "";
    /**
     * 终端类型（前端定义）
     */
    @DBCondition
    @DBField
    public int TerminalType = 0;
    /**
     * ip地址
     */
    @DBCondition
    @DBField
    public String IPAddress = "";
    /**
     * 主键
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.findInSet)
    @DBField
    public List<Integer> StationIDList = new ArrayList<>();
    /**
     * 主键
     */
    @DBJoinMulti(Name = "Name", MainTableField = "StationIDList", TableName = "fmc_station", Schemas = DBSchemas.Basic)
    public String StationNames = "";

    @JsonProperty("TerminalNumber")
    public String getTerminalNumber() {
        return TerminalNumber;
    }

    public void setTerminalNumber(String terminalNumber) {
        TerminalNumber = terminalNumber;
    }

    @JsonProperty("TerminalType")
    public int getTerminalType() {
        return TerminalType;
    }

    public void setTerminalType(int terminalType) {
        TerminalType = terminalType;
    }

    @JsonProperty("IPAddress")
    public String getIPAddress() {
        return IPAddress;
    }

    public void setIPAddress(String IPAddress) {
        this.IPAddress = IPAddress;
    }

    @JsonProperty("StationIDList")
    public List<Integer> getStationIDList() {
        return StationIDList;
    }

    public void setStationIDList(List<Integer> stationIDList) {
        StationIDList = stationIDList;
    }

    @JsonProperty("StationNames")
    public String getStationNames() {
        return StationNames;
    }

    public void setStationNames(String stationNames) {
        StationNames = stationNames;
    }
}
